#coding=utf-8
import wx
import wx.html
import wx.aui

from ids import *

class MainFrame(wx.Frame):
    
    def __init__(self, parent, id=-1, title="", pos=wx.DefaultPosition,
                 size=(600, 480), style=wx.DEFAULT_FRAME_STYLE |
                                            wx.SUNKEN_BORDER |
                                            wx.CLIP_CHILDREN):
        wx.Frame.__init__(self, parent, id, title, pos, size, style)
        
         # tell FrameManager to manage this frame        
        self._mgr = wx.aui.AuiManager()
        self._mgr.SetManagedWindow(self)
        
        # create menu
        mb = wx.MenuBar()

        file_menu = wx.Menu()
        file_menu.Append(wx.ID_EXIT, "Exit")

        edit_menu = wx.Menu()
        edit_menu.AppendSeparator();
        
        account_menu = wx.Menu()
        account_menu.AppendSeparator();
        
        data_menu = wx.Menu()
        data_menu.AppendSeparator();
        
        tools_menu = wx.Menu()
        tools_menu.AppendSeparator();
        
        help_menu = wx.Menu()
        help_menu.Append(ID_About, "About...")
        
        mb.Append(file_menu, "File")
        mb.Append(edit_menu, "Edit")
        mb.Append(account_menu, "Account")
        mb.Append(data_menu, "Account")
        mb.Append(tools_menu, "Data")
        mb.Append(help_menu, "Help")
        
        self.SetMenuBar(mb)

        self.statusbar = self.CreateStatusBar(2, wx.ST_SIZEGRIP)
        self.statusbar.SetStatusWidths([-2, -3])
        self.statusbar.SetStatusText("Ready", 0)
        self.statusbar.SetStatusText("Welcome To wxPython!", 1)

        # min size for the frame itself isn't completely done.
        # see the end up FrameManager::Update() for the test
        # code. For now, just hard code a frame minimum size
        self.SetMinSize(wx.Size(400, 300))

        # create some toolbars
        tb = self.CreateToolBar()#wx.TB_HORIZONTAL|wx.NO_BORDER)
        
        tb.SetToolBitmapSize(wx.Size(100,100))
        tb.AddLabelTool(101, "Test", wx.ArtProvider_GetBitmap(wx.ART_ERROR))
        tb.AddSeparator()
        tb.AddLabelTool(102, "Test", wx.ArtProvider_GetBitmap(wx.ART_QUESTION))
        tb.AddLabelTool(103, "Test", wx.ArtProvider_GetBitmap(wx.ART_INFORMATION))
        tb.AddLabelTool(103, "Test", wx.ArtProvider_GetBitmap(wx.ART_WARNING))
        tb.Realize()
        
        
        self._mgr.Update()

if __name__ == '__main__':
    app = wx.PySimpleApp()
    frm = MainFrame(None)
    frm.Show()
    app.MainLoop()
